home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / Tutorial / ARexx Tutorial / TuteRexx / DopusScreen.dopus5 < prev    next >
Text File  |  1998-09-04  |  1KB  |  30 lines

  1. /* DopusScreen.dopus5 */
  2. options results
  3. lf = '0a'x
  4. address 'DOPUS.1'
  5. dopus front
  6. dopus screen
  7. if rc = 5 then do
  8.   address command 'RequestChoice "Opus is iconified" OK'
  9.   exit
  10.   end
  11. dimensions = result
  12. text = 'The Opus screen name is: 'word(dimensions,1)
  13. dopus request '"'text'" OK'
  14. text = 'The Opus screen is 'word(dimensions,2)' pixels wide'||lf||'and 'word(dimensions,3)' high.'
  15. dopus request '"'text'" OK'
  16. text = 'The titlebar is 'word(dimensions,5)' pixels high, and'||lf||'it is a 'word(dimensions,4)' bit screen.'
  17. dopus request '"'text'" OK'
  18. x = trunc(word(dimensions,2) / 2) - trunc(word(dimensions,6) / 2)
  19. y = trunc((word(dimensions,3) - word(dimensions,5)) / 2) - trunc(word(dimensions,7) / 2)
  20. position = x'/'y'/'word(dimensions,6)'/'word(dimensions,7)
  21. lister new position
  22. handle = result
  23. text = 'This lister is in the screen centre,',
  24.         ||lf||'taking the titlebar height into account',
  25.         ||lf||'and is the default size.'
  26. lister request handle '"'text'" OK'
  27. lister close handle
  28. dopus back
  29. exit
  30.